package com.neu.question.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @TableName user_info
 */
@TableName(value ="user_info")
@Data
@AllArgsConstructor
public class UserInfo implements Serializable {

//    private List<String> roleStrlist;
//    private List<String> perminsStrlist;
    /**
     * 用户表主键
     */
    @TableId(value = "id")
    private String id;

    /**
     * 用户名
     */
    @TableField(value = "username")
    private String username;

    /**
     * 密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * 角色id
     */
    @TableField(value = "role_id")
    private String roleId;

    /**
     * 手机号
     */
    @TableField(value = "phone_num")
    private String phoneNum;

    /**
     * 开始时间
     */
    @TableField(value = "start_time")
    private Date startTime;

    /**
     * 截止时间（时间戳）
     */
    @TableField(value = "stop_time")
    private Date stopTime;

    /**
     * 是否启用（1启用，0不启用）
     */
    @TableField(value = "status")
    private String status;

    /**
     * 创建人
     */
    @TableField(value = "created_by")
    private String createdBy;

    /**
     * 创建时间
     */
    @TableField(value = "creation_date")
    private Date creationDate;

    /**
     * 最后修改人
     */
    @TableField(value = "last_updated_by")
    private String lastUpdatedBy;

    /**
     * 最后修改时间
     */
    @TableField(value = "last_update_date")
    private Date lastUpdateDate;

    @TableField(value = "password_question")
    private String passwordQuestion;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public UserInfo() {

    }

    public UserInfo(UserInfo userEntity) {
        super();
        this.id = userEntity.getId();
        this.username = userEntity.getUsername();
        this.password = userEntity.getPassword();
        this.roleId = userEntity.getRoleId();
        this.phoneNum = userEntity.getPhoneNum();
        this.startTime = userEntity.getStartTime();
        this.stopTime = userEntity.getStopTime();
        this.status = userEntity.getStatus();
        this.createdBy = userEntity.createdBy;
        this.creationDate = userEntity.getCreationDate();
        this.lastUpdatedBy = userEntity.getLastUpdatedBy();
        this.lastUpdateDate = userEntity.getLastUpdateDate();
        this.passwordQuestion= userEntity.getPasswordQuestion();
//        this.roleStrlist = userEntity.getRoleStrlist();
//        this.perminsStrlist = userEntity.getPerminsStrlist();
    }
}